#!/usr/bin/env bash
# Build just enough to run ./test:
# https://github.com/cirosantilli/linux-kernel-module-cheat#automated-tests
set -eu
test_size=1
while [ $# -gt 0 ]; do
  case "$1" in
    --size)
      test_size="$2"
      shift 2
      ;;
  esac
done
./build-test-boot --size "$test_size"
./build --all-archs test-gdb test-user-mode
